package com.gagakuai.demo.refrence;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/*
 * @program: settement
 * @description:
 * @author: houhong
 * @create: 2022-11-12 19:50
 */
@Component
public class ServiceB {


    private ServiceA serviceA;

    public ServiceA getServiceA() {
        return serviceA;
    }

    @Autowired
    public void setServiceA(ServiceA serviceA) {
        this.serviceA = serviceA;
    }

    public void m1() {
        System.out.println("Service2 m1");
        this.serviceA.m1();//@1
    }
}